package com.create.factorypatterm.simplefactory;

public class CarFactory{
  public static Car createCar(String type)
  {
/*  6 */     if (type.equals("Benz"))
/*  7 */       return new Benz();
/*  8 */     if (type.equals("Bmw"))
/*  9 */       return new Bmw();
/* 10 */     if (type.equals("Audi")) {
/* 11 */       return new Audi();
    }
/* 13 */     return null;
  }

  public static void main(String[] args)
  {
/* 20 */     Car car = createCar("Benz");
/* 21 */     car.create();
  }
}